from ..db.util import dbh

class BaseProcessor:
    """
    Function:
        create
        read
        update
        delete

    Return Value:
        <result>/list
        None
        True/False
    """
    @property
    def dbh(self):
        return dbh()

    def create(self, *args, **kwargs):
        """Return Value
            object/True/raise
        """
        raise NotImplementedError

    def read(self, *args, **kwargs):
        """Return Value
            object/list/None

        reserved kwargs:
            document - True
            collection - True

            args => document/True
            kwargs => collection/True
            else => collection/True
        """
        raise NotImplementedError

    def update(self, *args, **kwargs):
        """Return Value
            object/True/raise
        """
        raise NotImplementedError

    def delete(self, *args, **kwargs):
        """Return Value
            True/False/raise
        """
        raise NotImplementedError
